let a = 3
let result = 0
for (let i = 1;i<=a;i++)//a变成parseInt(input_arr)
{
    let result2 = 1
    for(let j = i;j>0;j--)
        {
            result2*=j
        }
        result += result2
}
console.log(result)